package br.iars.web.bean.util;

import java.util.List;

import br.iars.web.model.entity.User;

public class NeighborsDTO {
	public String type;

	public List<User> moviesNeighbors;
	public List<User> singersNeighbors;
	public List<User> booksNeighbors;

	public NeighborsDTO() {
		super();
	}

	public NeighborsDTO(String type) {
		super();
		this.type = type;
	}

	public NeighborsDTO(String type, List<User> moviesNeighbors, List<User> singersNeighbors, List<User> booksNeighbors) {
		super();
		this.type = type;
		this.moviesNeighbors = moviesNeighbors;
		this.singersNeighbors = singersNeighbors;
		this.booksNeighbors = booksNeighbors;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public List<User> getMoviesNeighbors() {
		return moviesNeighbors;
	}

	public void setMoviesNeighbors(List<User> moviesNeighbors) {
		this.moviesNeighbors = moviesNeighbors;
	}

	public List<User> getSingersNeighbors() {
		return singersNeighbors;
	}

	public void setSingersNeighbors(List<User> singersNeighbors) {
		this.singersNeighbors = singersNeighbors;
	}

	public List<User> getBooksNeighbors() {
		return booksNeighbors;
	}

	public void setBooksNeighbors(List<User> booksNeighbors) {
		this.booksNeighbors = booksNeighbors;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((booksNeighbors == null) ? 0 : booksNeighbors.hashCode());
		result = prime * result + ((moviesNeighbors == null) ? 0 : moviesNeighbors.hashCode());
		result = prime * result + ((singersNeighbors == null) ? 0 : singersNeighbors.hashCode());
		result = prime * result + ((type == null) ? 0 : type.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		NeighborsDTO other = (NeighborsDTO) obj;
		if (booksNeighbors == null) {
			if (other.booksNeighbors != null)
				return false;
		} else if (!booksNeighbors.equals(other.booksNeighbors))
			return false;
		if (moviesNeighbors == null) {
			if (other.moviesNeighbors != null)
				return false;
		} else if (!moviesNeighbors.equals(other.moviesNeighbors))
			return false;
		if (singersNeighbors == null) {
			if (other.singersNeighbors != null)
				return false;
		} else if (!singersNeighbors.equals(other.singersNeighbors))
			return false;
		if (type == null) {
			if (other.type != null)
				return false;
		} else if (!type.equals(other.type))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "NeighborsDTO [booksNeighbors=" + booksNeighbors + ", moviesNeighbors=" + moviesNeighbors + ", singersNeighbors=" + singersNeighbors
				+ ", type=" + type + "]";
	}

}
